<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">
<link href="style.css" type="text/css" rel="stylesheet">
<title>VGETEXPSS—Convert Exponents of Scalar SP FP Values to SP FP Value </title></head>
<body>
<h1>VGETEXPSS—Convert Exponents of Scalar SP FP Values to SP FP Value</h1>
<table>
<tr>
<th>Opcode/Instruction</th>
<th>Op/En</th>
<th>64/32 bit Mode Support</th>
<th>CPUID Feature Flag</th>
<th>Description</th></tr>
<tr>
<td>
<p>EVEX.NDS.LIG.66.0F38.W0 43 /r</p>
<p>VGETEXPSS xmm1 {k1}{z}, xmm2, xmm3/m32{sae}</p></td>
<td>T1S</td>
<td>V/V</td>
<td>AVX512F</td>
<td>Convert the biased exponent (bits 30:23) of the low single-precision floating-point value in xmm3/m32 to a SP FP value representing unbiased integer exponent. Stores the result to xmm1 under the writemask k1 and merge with the other elements of xmm2.</td></tr></table>
<h3>Instruction Operand Encoding</h3>
<table>
<tr>
<td>Op/En</td>
<td>Operand 1</td>
<td>Operand 2</td>
<td>Operand 3</td>
<td>Operand 4</td></tr>
<tr>
<td>T1S</td>
<td>ModRM:reg (w)</td>
<td>EVEX.vvvv (r)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td></tr></table>
<p><strong>Description</strong></p>
<p>Extracts the biased exponent from the normalized SP FP representation of the low doubleword data element of the source operand (the third operand) as unbiased signed integer value, or convert the denormal representation of input data to unbiased negative integer values. The integer value of the unbiased exponent is converted to single-precision FP value and written to the destination operand (the first operand) as SP FP numbers. Bits (127:32) of the XMM register destination are copied from corresponding bits in the first source operand.</p>
<p>The destination must be a XMM register, the source operand can be a XMM register or a float32 memory location. The the low doubleword element of the destination operand is conditionally updated with writemask k1.</p>
<p>Each GETEXP operation converts the exponent value into a FP number (permitting input value in denormal repre-sentation). Special cases of input values are listed in Table 5-8.</p>
<p>The formula is:</p>
<p>GETEXP(x) = floor(log<sub>2</sub>(|x|))</p>
<p>Notation <strong>floor(x)</strong> stands for maximal integer not exceeding real number x.</p>
<p>Software usage of VGETEXPxx and VGETMANTxx instructions generally involve a combination of GETEXP operation and GETMANT operation (see VGETMANTPD). Thus VGETEXPxx instruction do not require software to handle SIMD FP exceptions.</p>
<p><strong>Operation</strong></p>
<p>// NormalizeExpTinySPFP(SRC[31:0]) is defined in the Operation section of VGETEXPPS</p>
<p>// ConvertExpSPFP(SRC[31:0]) is defined in the Operation section of VGETEXPPS</p>
<p><strong>VGETEXPSS (EVEX encoded version)</strong></p>
<p>IF k1[0] OR *no writemask*</p>
<p>THEN DEST[31:0] (cid:197)</p>
<p>ConvertExpDPFP(SRC2[31:0])</p>
<p>ELSE</p>
<p>IF *merging-masking*</p>
<p>; merging-masking</p>
<p>THEN *DEST[31:0] remains unchanged*</p>
<p>ELSE</p>
<p>; zeroing-masking</p>
<p>DEST[31:0](cid:197) 0</p>
<p>FI</p>
<p>FI;</p>
<p>ENDFOR</p>
<p>DEST[127:32] (cid:197) SRC1[127:32]</p>
<p>DEST[MAX_VL-1:128] (cid:197) 0</p>
<p><strong>Intel C/C++ Compiler Intrinsic Equivalent</strong></p>
<p>VGETEXPSS __m128 _mm_getexp_ss( __m128 a, __m128 b);</p>
<p>VGETEXPSS __m128 _mm_mask_getexp_ss(__m128 s, __mmask8 k, __m128 a, __m128 b);</p>
<p>VGETEXPSS __m128 _mm_maskz_getexp_ss( __mmask8 k, __m128 a, __m128 b);</p>
<p>VGETEXPSS __m128 _mm_getexp_round_ss( __m128 a, __m128 b, int sae);</p>
<p>VGETEXPSS __m128 _mm_mask_getexp_round_ss(__m128 s, __mmask8 k, __m128 a, __m128 b, int sae);</p>
<p>VGETEXPSS __m128 _mm_maskz_getexp_round_ss( __mmask8 k, __m128 a, __m128 b, int sae);</p>
<p><strong>SIMD Floating-Point Exceptions</strong></p>
<p>Invalid, Denormal</p>
<p><strong>Other Exceptions</strong></p>
<p>See Exceptions Type E3.</p></body></html>